<!DOCTYPE html>
<html>

<head>

</head>

<body>
    <!-- <select id="mySelect">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
    </select>
    <script>
        var mySelect = document.getElementById('mySelect');
        console.log(mySelect);
        mySelect.addEventListener('input', (e) => {
            
            console.log(e);
        });
        // console.log(inputHandler);
        // function inputHandler(e) {
        //     console.log(e); 
        //     // console.log("inputHandler start");
        // }
    </script> -->

    <!-- select事件 -->
    <!-- <input id="test" type="text" value="Select me!" />
    <script>
        var elem = document.getElementById('test');
        elem.addEventListener('select', function (e) {
            console.log(e); // "select"
        }, false);
    </script> -->

    <!-- onchange 事件 -->
    <select size="1" onchange="changeEventHandler(event);">
        <option>chocolate</option>
        <option>strawberry</option>
        <option>vanilla</option>
    </select>

    <script>
        console.log(v)
        function changeEventHandler() {
            console.log(event.target.value)
        }
    </script>

    <script type="text/javascript">
        function formReset() {
            document.getElementById("myForm").reset()
        }
    </script>
    </head>

    <form id="myForm">
        Name: <input type="text" size="20"><br />
        Age: <input type="text" size="20"><br />
        <br />
        <input type="button" onclick="formReset()" value="Reset">
    </form>

</body>

</html>